Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

182
Vistas
How to disable "branchesTrue" property in jest coverage-summary.json

I am trying to generate a coverage-summary.json file using jest but I noticed something new with it...

total now shows a fifth property called branchesTrue. This didn't happen before and I can't pinpoint what version of jest it started writing this property when generating the report.

Looking into the node module called istanbul-lib-coverage and under the file file-coverage.js on line 304 I can see a comment saying that the branch truthiness can be optionally enabled... I suppose it could also mean that this should have been disabled by default or be optionally disabled.

It is not much of a huge problem but I just wanted to know how I can not show this when generating the coverage report without deleting it manually or commenting out this particular line of code in the node_modules directory.

I take this to be fairly new as well since the a comment under node_modules/istanbul-lib-coverage/lib/coverage-summary.js on line 40 says that it should only be four properties:

"CoverageSummary provides a summary of code coverage . It exposes 4 properties, lines, statements, branches, and functions. Each of these properties is an object that has 4 keys total, covered, skipped and pct. pct is a percentage number (0-100)."

before:

"total": {
    "lines": { "total": 3, "covered": 3, "skipped": 0, "pct": 100 },
    "statements": { "total": 3, "covered": 3, "skipped": 0, "pct": 100 },
    "functions": { "total": 1, "covered": 1, "skipped": 0, "pct": 100 },
    "branches": { "total": 0, "covered": 0, "skipped": 0, "pct": 100 }
  }

now:

"total": {
    "lines": { "total": 3, "covered": 3, "skipped": 0, "pct": 100 },
    "statements": { "total": 3, "covered": 3, "skipped": 0, "pct": 100 },
    "functions": { "total": 1, "covered": 1, "skipped": 0, "pct": 100 },
    "branches": { "total": 0, "covered": 0, "skipped": 0, "pct": 100 },
    "branchesTrue": { "total": 0, "covered": 0, "skipped": 0, "pct": "Unknown" }
  }

Any help is much appreciated...

about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda